<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function computed(str) {
            var newstr = str.split('')
            // console.log(newstr);
            newstr.splice(5, 1)
            newstr.splice(10, 1)
            newstr.reverse()
            newstr.splice(0,1,'啊')
            newstr.splice(8,1,'W')
            newstr.splice(13,1,'H')
            var result = newstr.join('')
            console.log(result);
        }
        computed('hello world 我爱你!')
    </script>
</body>

</html>